package team.freeroom.hotelmanage.repository.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import team.freeroom.hotelmanage.repository.entity.Authority;

import java.util.List;

/**
 * 权限类 Mapper
 *
 * @author aBadString
 */
@Mapper
@Repository
public interface AuthorityMapper {
    /**
     * 插入权限
     * @param authority
     * @return
     */
    int add(Authority authority);

    /**
     * 删除权限
     * @param roleId
     * @return
     */
    int deleteByRoleId(Long roleId);

    /**
     * 权限信息搜索查询
     * @param roleId
     * @return
     */
    List<Authority> findListByRoleId(Long roleId);
}
